var lowercaseLetters = "abcdefghijklmnopqrstuvwxyz";
var uppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var whitespace = " \t\n\r";
var nameDelimiters = "-. ";
var decimalPointDelimiter = ".";
var daysInMonth = makeArrayFromString(31,29,31,30,31,30,31,31,30,31,30,31);
//set up allowed characters for specific data types
//phone numbers
var phoneNumberDelimiters = "()- ";
var digitsInUSPhoneNumber = 10;
var validUSPhoneChars = digits + phoneNumberDelimiters;
var validWorldPhoneChars = digits + phoneNumberDelimiters + "+";
//electronic addresses
var validDomainNameChars = digits + uppercaseLetters + lowercaseLetters + "-_.";
//snail mail addresses
var addressDelimiters = ".,/-" + whitespace;
var validAddressCharacters = addressDelimiters + digits + uppercaseLetters + lowercaseLetters;
//US mail address parameters
var digitsInZIPCode1 = 5;
var digitsInZIPCode2 = 9;
var ZIPCodeDelimiters = "-";
var ZIPCodeDelimeter = "-";
var validZIPCodeChars = digits + ZIPCodeDelimiters;
var USStateCodes = "AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FM|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|MP|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY|AE|AA|AE|AE|AP";
var USStateCodeDelimiter = "|";
//Canadian mail address parameters
var cdnProvCodes = "BC|AB|SK|MB|ON|QC|NF|PE|NS|NB|NT|YT|NU";
var postalCodeDelimiter = " ";
var validPostalCodeChars = digits + lowercaseLetters + uppercaseLetters + postalCodeDelimiter;
var charsInPostalCode = 6;
var cdnProvCodeDelimiter = "|";
//credit card parameters
var creditCardDelimiters = " ";
function makeArray(n) {
for (var i = 1; i <= n; i++) {
this[i] = 0;
}
this[length] = n;
return this;
}
function makeArrayFromString() {
for (var i = 1; i <= makeArrayFromString.arguments.length; i++){